package com.czk.model.ptotorype.improve;

import java.io.Serializable;

public class Sheep implements Cloneable , Serializable {
    private String name;
    private String color;
    private Integer age;

    public Sheep(String name, String color, Integer age) {
        this.name = name;
        this.color = color;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "Sheep{" +
                "name='" + name + '\'' +
                ", color='" + color + '\'' +
                ", age=" + age +
                '}';
    }

    @Override
    public Object clone() throws CloneNotSupportedException {
        Sheep sheep=null;
        try {
             sheep =(Sheep) super.clone();
        }catch (Exception ex){
            ex.printStackTrace();
        }
        return sheep;
    }
}
